<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: HP
  Date: 2023/10/6
  Time: 9:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>图书列表</title>
</head>
<body>
    <h1>1. PageContext作用域<hr></h1>
    <%
        String book = (String) pageContext.getAttribute("book");
        out.println(book);
    %>
    <h1>2. Request作用域<hr></h1>
    <%
        String book1 = (String) request.getAttribute("book");
        out.println(book1);
    %>
    <h1>3. Session作用域<hr></h1>
    <%
        String book2 = (String) session.getAttribute("book");
        String id = session.getId();
        out.println("session-id:" + id + "<br>");
        out.println(book2);
    %>
    <h1>4. application作用域<hr></h1>
    <%
        String book3 = (String) application.getAttribute("book");
        out.println(book3);
    %>
</body>
</html>
